package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbQuantityUnit entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_QuantityUnit", schema = "dbo", catalog = "AGDB")
public class TbQuantityUnit implements java.io.Serializable {

	// Fields

	private String quId;
	private String quName;
	private Set<TbMedicineConfirm> tbMedicineConfirms = new HashSet<TbMedicineConfirm>(
			0);

	// Constructors

	/** default constructor */
	public TbQuantityUnit() {
	}

	/** minimal constructor */
	public TbQuantityUnit(String quId) {
		this.quId = quId;
	}

	/** full constructor */
	public TbQuantityUnit(String quId, String quName,
			Set<TbMedicineConfirm> tbMedicineConfirms) {
		this.quId = quId;
		this.quName = quName;
		this.tbMedicineConfirms = tbMedicineConfirms;
	}

	// Property accessors
	@Id
	@Column(name = "QU_Id", unique = true, nullable = false, length = 4)
	public String getQuId() {
		return this.quId;
	}

	public void setQuId(String quId) {
		this.quId = quId;
	}

	@Column(name = "QU_Name", length = 20)
	public String getQuName() {
		return this.quName;
	}

	public void setQuName(String quName) {
		this.quName = quName;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbQuantityUnit")
	public Set<TbMedicineConfirm> getTbMedicineConfirms() {
		return this.tbMedicineConfirms;
	}

	public void setTbMedicineConfirms(Set<TbMedicineConfirm> tbMedicineConfirms) {
		this.tbMedicineConfirms = tbMedicineConfirms;
	}

}